package Operate;

import BookList.Booklist;

import java.util.Scanner;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-25
 * Time:10:10
 */
public class Backoperate implements IO {
    @Override
    public void work(Booklist book) {
        System.out.println("请输入归还的图书：");
        Scanner sc=new Scanner(System.in);
        String name=sc.nextLine();
        for(int i=0;i< book.size;i++)
        {
            if(book.getBook(i).getName().equals(name))
            {
                book.getBook(i).setBorrow(false);

            }
        }
        System.out.println("归还成功");
    }
}
